<%@ include file="/WEB-INF/jsp/includes/include.jsp" %>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>User Registration</title>

		<c:set var="form"><spring:theme code="form"/></c:set>
		<c:if test="${not empty form}">
			<link rel="stylesheet" href="<c:url value="${form}"/>" type="text/css" />
		</c:if>

	</head>

	<body>
	
		<h1>User Registration</h1>
	
		<form:form method="post" commandName="command">
			<div id="mandatoryFieldComments">All fields are mandatory</div>
			<fieldset>
				<legend>User Details</legend>
				<div>
					<label for="user.firstName" class="mandatoryField">First Name:</label>
					<form:input path="user.firstName" id="user.firstName" size="50" maxlength="100" cssClass="text" cssErrorClass="text_error"/>
					<form:errors path="user.firstName" id="user.firstNameErrors" cssClass="error"/>
				</div>
				
				<div>
					<label for="user.lastName" class="mandatoryField">Last Name:</label>
					<form:input path="user.lastName" id="user.lastName" size="50" maxlength="100" cssClass="text" cssErrorClass="text_error"/>
					<form:errors path="user.lastName" id="user.lastNameErrors" cssClass="error"/>
				</div>
				
				<div>
					<label for="user.username" class="mandatoryField">Username: (use your current email address)</label>
					<form:input path="user.username" id="user.username" size="50" maxlength="100" cssClass="text" cssErrorClass="text_error"/>
					<form:errors path="user.username" id="user.usernameErrors" cssClass="error"/>
				</div>
				
				<div>
					<label for="user.password" class="mandatoryField">Password:</label>
					<form:password path="user.password" id="user.password" size="50" maxlength="100" cssClass="text" cssErrorClass="text_error"/>
					<form:errors path="user.password" id="user.passwordErrors" cssClass="error"/>
				</div>
				
				<div>
					<label for="verifyPassword" class="mandatoryField">Verify Password:</label>
					<form:password path="verifyPassword" id="verifyPassword" size="50" maxlength="100" cssClass="text" cssErrorClass="text_error"/>
					<form:errors path="verifyPassword" id="verifyPasswordErrors" cssClass="error"/>
				</div>
				
			</fieldset>
		
			<fieldset class="submit">
				<input type="submit" value="Register" class="submit"/>
			</fieldset>

		</form:form>
													
	</body>
</html>
